#ifndef GLWIDGET_H
#define GLWIDGET_H

#include <QGLWidget>

#include "../src/system.h"

class GLWidget : public QGLWidget{
	Q_OBJECT

	public:
		GLWidget(QWidget *parent = 0);
		~GLWidget();

		System* getSystem();
		QSize minimumSizeHint() const;
		QSize sizeHint() const;
		void createMassSpring(int, double);
		void createBuilding(int, double);

	protected:
		void initializeGL();
		void paintGL();
		void resizeGL(int width, int height);
	
	private slots:
		void calculate();
		
	private:
		System *system;
		QTimer *timer;
		unsigned int t;
};

#endif
